<style lang='scss'>
</style>

<template>
    <view class='view1'>
        <!-- 轮播图 -S -->
        <!-- <u-swiper :list="state.view1bananerArr" border-radius="16"></u-swiper> -->
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <p>asd</p>
        <!-- 轮播图 -E -->
        <u-popup v-model="state.show" mode="center" width="500rpx" height="600px">
            <view>
                骊山语罢清宵半，泪雨霖铃终不怨
            </view>
        </u-popup>
    </view>
</template>

<script setup lang='ts'>
import { reactive, ref } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { banner, listsAll, searchSketch } from "@/api/index";
const state = reactive<{
    view1bananerArr: Array<object>;
    show: boolean;
}>({
    show: false,
    view1bananerArr: [],
});
// 请求数据
const getData = async () => {
    const view1bananerArr = await banner();
    uni.setStorageSync("view1bananerArr", view1bananerArr);
};
// 本地数据
const localData = () => {
    state.view1bananerArr = uni.getStorageSync("view1bananerArr") || [];
    state.show = true;
};
onLoad(() => {
    getData().finally(() => {
        localData();
    });
});
onShow(() => {
    console.log("onShow");
});
defineExpose({ getData });
</script>